<?php

namespace Winter\Blog\Models;

use Model;
use Str;
use Url;
use Winter\Pages\Classes\MenuItem;
use Winter\Sitemap\Classes\DefinitionItem;

class Banner extends Model
{
    use \Winter\Storm\Database\Traits\Validation;

    public $table = 'winter_blog_banners';

    /**
     * Enable Modal Timestamps
     *
     * @var boolean
     */
    public $timestamps = true;

    /**
     * Guarded Model attributes
     * 
     * @var array
     */
    protected $guarded = [
        '*'
    ];

    /**
     * Fillable Model attributes
     * 
     * @var array
     */
    protected $fillable = [
        "title",
        "description",
    ];

    /**
     * Model Validation Rules
     * 
     * @var array
     */
    public $rules = [
        'title' => 'required'
    ];

    /**
     * Mutable Date Attributes
     * 
     * @var array
     */
    protected $dates = [
        'created_at',
        'updated_at'
    ];

    public $attachMany = [
        'featured_images' => [
            File::class,
            'order' => 'sort_order',
        ]
    ];

    
}
